<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>公司职工管理系统 - 首页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            height: 100vh;
            background-image: url('images/R.jpg');
            background-size: cover;
            background-position: center center;
            background-repeat: no-repeat;
        }

        #header {
            text-align: left;
            font-size: 25px;
            font-weight: bold;
            color: #fff;
            background-color: #104E8B;
            border-bottom: 1px solid #ccc;
            padding: 10px 0;
        }

        #sidebar {
            display: flex;
            padding: 0;
            box-sizing: border-box;
        }

        #sidebar a {
            text-align: center;
            text-decoration: none;
            font-weight: bold;
            color: black;
            padding: 10px 40px;
        }

        #sidebar a:hover {
            background-color: #FFEFDB;
        }

        #sidebar a.active {
            background-color: #98FB98;
        }

        .main-content {
            padding: 40px;
            box-sizing: border-box;
            color: white;
        }

    </style>
</head>
<body>
<div id="header">
    公司职工管理系统
</div>

<div id="sidebar">
    <a href="index.jsp" class="active">首页</a>
    <a href="staff_list" onclick="loadUserManagement()">员工信息管理</a>
    <a href="login.jsp">退出账户</a>
</div>

<div id="wrap">
    <div id="content" class="main-content">
        <h2>欢迎登录公司职工管理系统!</h2>
    </div>

    <div id="dynamicContent" class="main-content hidden">
    </div>
</div>

<script>
    function loadUserManagement() {
        var ret = new XMLHttpRequest();
        ret.onreadystatechange = function () {
            if (this.readyState === 4 && this.status === 200) {
                document.getElementById("dynamicContent").innerHTML = this.responseText;
            }
        };
        ret.open("GET", "staff_list.jsp", true);
        ret.send();
    }
</script>
</body>
</html>

